Get started

Build a bilingual Oink documentation site with Hugo Extended.

Oink is a Hugo theme whose complete browser runtime ships with the theme. A consumer site builds with Hugo Extended alone: no Node.js package installation, PostCSS step, CDN, or build-time remote asset download is part of the default path.

Choose a starting point

  • Hugo Module — recommended: import github.com/pgsty/oink in an existing or new Hugo site. See the Oink quick start.
  • Project site: use the independent pgsty/oink.pgsty.com repository as a complete bilingual configuration and regression reference.
  • Existing Docsy site: follow the migration guide to remove common overrides and the consumer npm asset pipeline without rewriting content.

Install the prerequisites

Install Git, Go, and Hugo Extended 0.160.1 or newer. See Before you begin for platform notes and verification commands.

Add Oink

From the site root:

hugo mod init github.com/example/product-docs
hugo mod get github.com/pgsty/oink@THEME_REF

Then import the theme in hugo.yaml:

module:
  imports:
    - path: github.com/pgsty/oink

Pin THEME_REF to a released tag or immutable commit and commit go.mod and go.sum.

Build contract

The same commands preview and build every supported module consumer:

hugo server --disableFastRender
hugo --gc --minify

Next steps

  1. Set the basic configuration.
  2. Add repository, copyright, logo, and menu values.
  3. Put translations side by side as page.md and page.zh.md.
  4. Add and customize content.
  5. Choose a deployment target.

Use the Oink theme

Import the Oink Hugo Module or inspect the independent project site.

Other setup options

Use an OINK archive, Git checkout, or Hugo Module.

Run OINK in a container

Build and preview an OINK site with a Hugo Extended container.

Basic site configuration

Configure an OINK site, languages, navigation, and local features.

Troubleshooting and known issues

Diagnose OINK installation, build, language, search, and platform issues.